/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:49 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class BaikiemtratuluanEntity
    {
        public BaikiemtratuluanEntity()
        {
			m_fk_ithongtinbaikiemtraid=0;
			m_fk_icauhoiid=0;
			m_snoidung="";
			m_fdiem=0;
			m_snhanxet="";
        }
		private Int64 m_fk_ithongtinbaikiemtraid;
		public Int64 FK_iThongtinbaikiemtraID
		{
			get { return m_fk_ithongtinbaikiemtraid ; }
			set { m_fk_ithongtinbaikiemtraid = value; }
		}
		private Int64 m_fk_icauhoiid;
		public Int64 FK_iCauhoiID
		{
			get { return m_fk_icauhoiid ; }
			set { m_fk_icauhoiid = value; }
		}
		private String m_snoidung;
		public String sNoidung
		{
			get { return m_snoidung ; }
			set { m_snoidung = value; }
		}
		private float m_fdiem;
		public float fDiem
		{
			get { return m_fdiem ; }
			set { m_fdiem = value; }
		}
		private String m_snhanxet;
		public String sNhanxet
		{
			get { return m_snhanxet ; }
			set { m_snhanxet = value; }
		}

        #region Comparison
        public static List<BaikiemtratuluanEntity> Sort(List<BaikiemtratuluanEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(BaikiemtratuluanEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<BaikiemtratuluanEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<BaikiemtratuluanEntity> COMPARISON_FK_iThongtinbaikiemtraID
		{
			get
			{
				return delegate(BaikiemtratuluanEntity entity,BaikiemtratuluanEntity other)
				{
					return entity.FK_iThongtinbaikiemtraID.CompareTo(other.FK_iThongtinbaikiemtraID);
				};
			}
		}
		public static Comparison<BaikiemtratuluanEntity> COMPARISON_FK_iCauhoiID
		{
			get
			{
				return delegate(BaikiemtratuluanEntity entity,BaikiemtratuluanEntity other)
				{
					return entity.FK_iCauhoiID.CompareTo(other.FK_iCauhoiID);
				};
			}
		}
		public static Comparison<BaikiemtratuluanEntity> COMPARISON_sNoidung
		{
			get
			{
				return delegate(BaikiemtratuluanEntity entity,BaikiemtratuluanEntity other)
				{
					return entity.sNoidung.CompareTo(other.sNoidung);
				};
			}
		}
		public static Comparison<BaikiemtratuluanEntity> COMPARISON_iDiem
		{
			get
			{
				return delegate(BaikiemtratuluanEntity entity,BaikiemtratuluanEntity other)
				{
					return entity.fDiem.CompareTo(other.fDiem);
				};
			}
		}
		public static Comparison<BaikiemtratuluanEntity> COMPARISON_sNhanxet
		{
			get
			{
				return delegate(BaikiemtratuluanEntity entity,BaikiemtratuluanEntity other)
				{
					return entity.sNhanxet.CompareTo(other.sNhanxet);
				};
			}
		}
        #endregion
    }
}
